Mouse Hovers over Portion on Canvas Shows Status

I was wondering what the function was when lets say I have a canvas with different shapes drawn on the canvas. If I put my mouse over that shape, I can get a little pop-up or on the status bar to say what that shape is based on the coordinates. I remember seeing a sample dxl for this, when I put my mouse in the right corner of the canvas, it would say "right corner", without clicking anything, and when i put my mouse in the bottom left, it would say "left corner". Does anyone remember or can help me figure out what this function or cb is?
phan423 - Thu Apr 12 20:14:44 EDT 2012

Re: Mouse Hovers over Portion on Canvas Shows Status
Peter_Albert - Fri Apr 13 02:40:54 EDT 2012

The keyword to search for in the DXL Help is "tooltip":

DB box = create "Tooltip example" 
string toolTipCallback(DBE xx, string mystring) {
  return "The cursor is in the " mystring "
          corner"
} 
void repaint(DBE c)
{
  clearToolTips c 
  addToolTip(c, 0, 0, 100, 100, "upper left",    
     toolTipCallback) 
  addToolTip(c, 0, 100, 100, 100, "lower left",
     toolTipCallback) 
  addToolTip(c, 100, 0, 100, 100, "upper right",
     toolTipCallback) 
  addToolTip(c, 100, 100, 100, 100, "lower
     right", toolTipCallback)
} 
DBE canvasWithTips = canvas(box, 200, 200, repaint) 
show box

 


Regards,

Peter